#include "authenticationpopups.h"
#include "ui_authenticationpopups.h"
#include <QMovie>
#include <QGraphicsDropShadowEffect>

AuthenticationPopups::AuthenticationPopups(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AuthenticationPopups)
{
    ui->setupUi(this);

    //弹出子窗口时禁用主窗口
    this->setWindowModality(Qt::ApplicationModal); //阻塞除当前窗体之外的所有的窗体

    this->setAttribute(Qt::WA_TranslucentBackground);//设置窗口背景透明
    this->setWindowFlags(Qt::FramelessWindowHint);   //设置无边框窗口



    //设置具体阴影
    QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this);
    shadow_effect->setOffset(0, 0);

    //阴影颜色
    shadow_effect->setColor(QColor(38, 78, 119, 127));
    //阴影半径
    shadow_effect->setBlurRadius(10);
    ui->label->setGraphicsEffect(shadow_effect);

    //显示动图
    ui->label_4->setScaledContents(true);
    QMovie *movie = new QMovie(":/new/prefix1/resource/6.gif");
    ui->label_4->setMovie(movie);
    movie->start();
}

AuthenticationPopups::~AuthenticationPopups()
{
    delete ui;
}

void AuthenticationPopups::setLibel(QString str)
{
    ui->label_3->setText(str);
}

void AuthenticationPopups::setLibel2(QString str)
{
    ui->label_5->setText(str);
}

void AuthenticationPopups::setLibel3(QString str)
{
    ui->label_2->setText(str);
}
